<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<?php
$arr=[['id'=>'1','author'=>'zhangsan','name'=>'122','price'=>'12.23']]
?>
<body>
    <table>
        <tr>
            <td>编号</td>
            <td>作者</td>
            <td>书名</td>
            <td>价格</td>
        </tr>
        <?php foreach($arr as $v):?>
            <tr>
            <td><?php echo $v['id']?></td>
            <td><?php echo $v['author']?></td>
            <td><?php echo $v['name']?></td>
            <td><?php echo $v['price']?></td>
            </tr>
            <?php endforeach; ?>
    </table>
</body>
</html>

